package com.java.exer9;

/**
 * 排序算法类
 */
public class SortUtil {
    public static void sort(SortInter[] sortObjs) {

        for (int i = sortObjs.length - 2; i >= 0; i--) {
            for (int j = 0; j <= i; j++) {
                if (sortObjs[j].compareTo(sortObjs[j + 1]) > 0) {
                    SortInter temp = sortObjs[j];
                    sortObjs[j] = sortObjs[j + 1];
                    sortObjs[j + 1] = temp;
                }
            }
        }

    }
}
